package com.linln.admin.app.constants;

public enum TaskTypeEnum {

    CREATE_DEV_BRANCH("1", "创建各个应用的开发分支"),

    PUBLISHED("2", "合并代码到PROD，并将PROD合并到现在所有正在开发的分支上"),

    MERGE_DEV_RELEASE("3", "开发分支代码合并到发布分支"),

    CHECK_PMD("4", "检查发布分支上的代码规范"),

    CREATE_RELEASE_BRANCH("5", "给各个开发分支创建发布分支"),

    MERGE_PROD_DEV("6", "将PROD代码合并到当前开发的分支上"),

    MVN_DEPLOY("7", "将项目deploy到maven仓库"),

    MONITOR_AUTO_IMPORT_APP("8", "从应用管理的所有应用中自动分析并导入"),
    MERGE_CUR_DEV("9", "将当前分支代码合并到指定分支"),
    MERGE_2_SRC("10", "将当前分支代码合并到SRC对应的分支");
    private String type;
    private String title;

    TaskTypeEnum(String type, String title) {
        setType(type);
        setTitle(title);
    }

    public static TaskTypeEnum getTaskType(String type) {
        for (TaskTypeEnum t : TaskTypeEnum.values()) {
            if (t.getType().equals(type)) {
                return t;
            }
        }
        return null;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}
